Why am I passionate about this?

The art of computer programming is a lot like the art of writing: It's not just about what your program says but about how it says it. One of the reasons I like the C and C++ languages—which I picked up in the late 1990s and haven't put down since—is that, as compiled, non-sandboxed languages, they promise total control over the machine. Show me where you want each byte of data to go in memory; show me the machine instructions you want; and I can make C++ do that for you. 


I wrote...

Mastering the C++17 STL

By Arthur O'Dwyer,

Book cover of Mastering the C++17 STL

What is my book about?

I wrote my first book in 2017, as the C++17 standard was just being finalized. It covers the entirety of…

When you buy books, we may earn a commission that helps keep our lights on (or join the rebellion as a member).

The books I picked & why

Book cover of The Elements of Programming Style

Arthur O'Dwyer Why did I love this book?

This tour de force probably couldn't get written today. Kernighan and Plauger take snippets of Fortran and PL/I code from real, published textbooks and find things to fix about them. Now, many of their specific concerns are relics of the "structured programming" wars of the 1960s (overuse of arithmetic IF and GOTO) or quirks of the programming languages in question (undeclared variables silently getting the wrong type); but this is educational in itself. If you wonder what's so bad about GOTO, or why we need to declare functions and variables before use, this book may enlighten you. And despite its age, almost every example finds some present-day analog. For example, Kernighan and Plauger's advice to avoid manually counted Hollerith strings in Fortran applies equally to manually counted array bounds in C++: don't write "int a[5]" when you can write "int a[]". The authors boil every couple of pages down to a language-agnostic mantra, such as: "Let the machine do the dirty work." "Make input easy to prepare and output self-explanatory." "If a logical expression is hard to understand, try transforming it."

The title, of course, is a reference to Strunk and White's The Elements of Style (1959), which has its own mantras equally applicable to software design: "Put statements in positive form." "Use orthodox spelling." "Express coordinate ideas in similar form." But that's a story for another day.

By Brian W. Kernighan, P.J. Plauger,

Why should I read it?

1 author picked The Elements of Programming Style as one of their favorite books, and they share why you should read it.

What is this book about?

This rounds out a collection of works by Kernighan. Each book of his covers a different aspect of software, in clear form with logical concepts. This book covers the look and feel of the code itself. As with the other works, some concepts have evolved as languages have evolved and the normal size of software projects has continued to expand. But the book still has many relevant points and is an interesting read for those wanting to delve into how software development as a process has been growing and evolving over time.


Book cover of The C Programming Language

Arthur O'Dwyer Why did I love this book?

Next to Fred Brooks' The Mythical Man-Month, this is perhaps the most classic of all classic programming books.

The authors write: "Besides showing how to make effective use of the language, we have also tried where possible to illustrate useful algorithms and principles of good style and sound design."

The book is astoundingly practical as a tutorial, which is itself a testament to the Unix "pipe" model of programming: By page 13, they've introduced getchar and putchar, and by the end of Chapter 1, twenty pages later, you've implemented a host of useful utilities including cat, wc, and detab. In Chapter 5 you implement a function recognizable as the now-standard qsort; in Chapter 8 you implement malloc itself.

Now, I recommend "K&R1," not the more popular "K&R2." The first edition was issued in 1978 at a slim 225 pages; the second edition, a decade later, added conformance with ANSI Standard C89 at the cost of an additional 50 pages in the process. At the time, this was a bargain: you get all the timeless benefits of K&R, plus learn C89 in the process.

These days, I'm not sure learning C89 is much better than learning K&R C: you'll have to update your knowledge somehow, either way. And I like old things. So I recommend you treat yourself to a trip through history and read K&R1. To coin a phrase: "Get the little book!"

By Brian W. Kernighan, Dennis M. Ritchie,

Why should I read it?

5 authors picked The C Programming Language as one of their favorite books, and they share why you should read it.

What is this book about?

Known as the bible of C, this classic bestseller introduces the C programming language and illustrates algorithms, data structures, and programming techniques.


Ad

Book cover of Adventures in the Radio Trade: A Memoir

Adventures in the Radio Trade by Joe Mahoney,

Adventures in the Radio Trade documents a life in radio, largely at Canada's public broadcaster. It's for people who love CBC Radio, those interested in the history of Canadian Broadcasting, and those who want to hear about close encounters with numerous luminaries such as Margaret Atwood, J. Michael Straczynski, Stuart…

Book cover of The Design of Everyday Things

Arthur O'Dwyer Why did I love this book?

This book greatly influenced my philosophy around style. Norman's ostensible subject is the design of physical objects, like emergency exits, shower faucets, and refrigerators, but most of what he says is directly applicable to software design and API design, too.

For example: Whatever you expose or document about your interface, the user will take that and form a mental model of the implementation—and he'll program against that mental model, not against your documentation. So you'd better make sure that your interface—by exposing certain details and deemphasizing others, appropriate naming, and so on—suggests a mental model that will be useful to the user (even if it is not correct in every particular).

For example, a horizontal rod mounted on a door affords pushing (a bit of jargon that's entered my technical vocabulary), while a vertical rod affords pulling. If you use the design language of a horizontal rod, people will push it, no matter how many signs you put up! Designing appropriate interfaces is an important art for the software engineer; this book may open your eyes to patterns you never saw before.

By Don Norman,

Why should I read it?

5 authors picked The Design of Everyday Things as one of their favorite books, and they share why you should read it.

What is this book about?

Even the smartest among us can feel inept as we fail to figure out which light switch or oven burner to turn on, or whether to push, pull, or slide a door. The fault, argues this ingenious,even liberating,book, lies not in ourselves, but in product design that ignores the needs of users and the principles of cognitive psychology. The problems range from ambiguous and hidden controls to arbitrary relationships between controls and functions, coupled with a lack of feedback or other assistance and unreasonable demands on memorization. The Design of Everyday Things shows that good, usable design is possible. The…


Book cover of Gödel, Escher, Bach: An Eternal Golden Braid

Arthur O'Dwyer Why did I love this book?

Every "computer person" should read GEB at least once. Preferably in high school, when you still have the free time to dive deep into all the recreational math exercises. If you're already working 40-hour weeks and wonder who has time for Hofstadter's 750-page "metaphorical fugue on minds and machines," all I can say is: Better late than never!

By Douglas R. Hofstadter,

Why should I read it?

15 authors picked Gödel, Escher, Bach as one of their favorite books, and they share why you should read it.

What is this book about?

Douglas Hofstadter's book is concerned directly with the nature of maps" or links between formal systems. However, according to Hofstadter, the formal system that underlies all mental activity transcends the system that supports it. If life can grow out of the formal chemical substrate of the cell, if consciousness can emerge out of a formal system of firing neurons, then so too will computers attain human intelligence. Goedel, Escher, Bach is a wonderful exploration of fascinating ideas at the heart of cognitive science: meaning, reduction, recursion, and much more.


Ad

Book cover of I Am Taurus

I Am Taurus by Stephen Palmer,

The constellation we know as Taurus goes all the way back to cave paintings of aurochs at Lascaux. This book traces the story of the bull in the sky, a journey through the history of what has become known as the sacred bull.

Each of the sections is written from…

Book cover of Effective Modern C++

Arthur O'Dwyer Why did I love this book?

Scott Meyers' Effective C++ series was insanely influential around the turn of the millennium. Then C++11 obsoleted almost the whole series by changing the language out from under it. This book—Scott Meyers' last, as of 2024—is the only one that remains relevant to today's C++. It assumes the reader is reasonably familiar with C++98, and then explains smart pointers, move semantics, perfect forwarding, std::initializer_list, decltype and auto, and many other "modern C++" features, in Meyers' trademark item-oriented format, which is easily digestible and quotable.

The past decade of C++ standardization has added plenty of things that this book doesn't mention; but the subjects it does talk about, by and large, have not yet become obsolete. And there's still nobody who writes about C++ quite like Scott Meyers.

By Scott Meyers,

Why should I read it?

1 author picked Effective Modern C++ as one of their favorite books, and they share why you should read it.

What is this book about?

Coming to grips with C++11 and C++14 is more than a matter of familiarizing yourself with the features they introduce (e.g., auto type declarations, move semantics, lambda expressions, and concurrency support). The challenge is learning to use those features effectively - so that your software is correct, efficient, maintainable, and portable. That's where this practical book comes in. It describes how to write truly great software using C++11 and C++14 - i.e. using modern C++. Topics include: The pros and cons of braced initialization, noexcept specifications, perfect forwarding, and smart pointer make functions The relationships among std::move, std::forward, rvalue references,…


Explore my book 😀

Mastering the C++17 STL

By Arthur O'Dwyer,

Book cover of Mastering the C++17 STL

What is my book about?

I wrote my first book in 2017, as the C++17 standard was just being finalized. It covers the entirety of the C++ Standard Library as it existed at the time, including the newest parts such as std::optional and std::variant; the C++11 parts such as smart pointers, std::mutex, and std::regex; and the age-old parts such as std::vector.

The style is discursive; I think it's impossible to understand C++ or any modern engineering system without knowing something of where it came from. For example, the chapter on I/O starts with the POSIX system calls such as "write," then moves to "fwrite" and "printf," before introducing std::cout and iostreams.

Book cover of The Elements of Programming Style
Book cover of The C Programming Language
Book cover of The Design of Everyday Things

Share your top 3 reads of 2024!

And get a beautiful page showing off your 3 favorite reads.

1,766

readers submitted
so far, will you?

Ad

📚 You might also like…

Book cover of Victoria Unveiled

Victoria Unveiled by Shane Joseph,

A fast-paced literary thriller with a strong sci-fi element and loaded with existential questions. Beyond the entertainment value, this book takes a hard look at the perilous world of publishing, which is on a crash course to meet the nascent, no-holds-barred world of AI. Could these worlds co-exist, or will…

Book cover of Captain James Heron First Into the Fray: Prequel to Harry Heron Into the Unknown of the Harry Heron Series

Captain James Heron First Into the Fray by Patrick G. Cox, Janet Angelo (editor),

Captain Heron finds himself embroiled in a conflict that threatens to bring down the world order he is sworn to defend when a secretive Consortium seeks to undermine the World Treaty Organisation and the democracies it represents as he oversees the building and commissioning of a new starship.

When the…

5 book lists we think you will like!

Interested in artificial intelligence, presidential biography, and machine learning?

Machine Learning 53 books